﻿using Services.DAL;
using Services.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.BLL
{
   public class UserInfoManager
    {
        public static UserInfoResponseEntity Login(UserInfoRequestEntity entity)
        {
            return UserInfoService.Login(entity);
        }
        //仅仅为了测试token验证
        public static UserInfoResponseEntity GetUserInfo(string uid)
        {
            return UserInfoService.GetUserInfo(uid);
        }

        public static UserInfoResponseEntity Register(UserInfoEntity entity)
        {
            //判断重复
            //生成该用户的token
            entity.UserToken = HashHelper.Hash_2_MD5_32(entity.LoginID+"salt000");
            return UserInfoService.Register(entity);
        }
    }
}
